<?php
include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/interceptor.php");
include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/head.php");
include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/plugin/weather.php");
?>
<body>
<section id="container" class="">
    <!--顶栏 start-->
    <?php include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/top.php"); ?>
    <!--顶栏 end-->
    <!--边栏 start-->
    <?php include($_SERVER['DOCUMENT_ROOT'] . "/admin/includes/left.php"); ?>
    <!--边栏 end-->

    <!--主视窗 start-->
    <section id="main-content">
        <section class="wrapper" id="rightCol"></section>
    </section>
    <!--主视窗 end-->
</section>

<!-- js placed at the end of the document so the pages load faster -->
<script src="/admin/static/js/bootstrap.min.js"></script>
<script src="/admin/static/js/jquery.scrollTo.min.js"></script>
<script src="/admin/static/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="/admin/static/js/owl.carousel.js"></script>
<script src="/admin/static/js/jquery.customSelect.min.js"></script>

<!--common script for all pages-->
<script src="/admin/static/js/common-scripts.js"></script>

<script>
    $(function () {
        loadMain("main.php");

        $("a").click(function (e) {
            var href = $(this).attr("href");
            if (href.indexOf(".php") > 0) {
                $(".active").removeClass("active");
                $(this).parents("li").addClass("active");
                $(this).parents("li").siblings(".open").click();
                loadMain(e.currentTarget);
            } else if (href.indexOf("javascript:") === 0) {
                return;
            }
            e.preventDefault ? e.preventDefault() : e.returnValue = false;
        });
    });

    function loadMain(url) {
        $.get(url, function (data) {
            $("#rightCol").html(data);
        });
    }
</script>

</body>
</html>